{*include file="template/admin_head.htm"*}

<table width="100%" cellpadding="0" cellspacing="0" id="containtable">
<tr>
        <td valign="top" bgcolor="#FFFFFF">
            <div class="pannel">
                <div class="pl"></div>
                <div class="pr"></div>
                <div class="pc1">
                    <form action="" method="post" id="search_form" name="search_form">
                        <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                        <div class="pt">
                            
					标题名称:<input type="text" size="12" id="stitle" name="stitle" class="tet" />&nbsp;&nbsp;
                            <input type="image" src="public/images/admin/icon_search_btn.gif">
                        </div>
                    </form>
                </div>
            </div>

            <div class="wrapper">
                {*if $cf_action=='add' || $cf_action=='edit'*}
                <script type="text/javascript">
                    $(function(){
                        $("#act_form").submit(function(){
                            if($("#menu_title").val()==''){
                                my_alert('请输入标题','Error',"$('#menu_title').focus()");
                                return false;
                            }
                        });
                    })

                </script>

                <div class="content_panel_title">
                <div class="contentpanelleft"></div>
                <div class="contentpanelcenter">
                    <span class="contentpanelcenter_font">新增/修改菜单</span><span><a class="edit at" href="{*$cf_self_page*}">菜单管理</a></span>                </div>
                <div class="contentpanelrihgt"></div>
            </div>
                <div class="content_table_center_style">
                	<div class="p8">
                    <form name="act_form" id="act_form" method="post" action="{*$cf_self_page*}">
                        <input name="id" id="id" type="hidden" value="{*$row.menu_id*}" />
                        <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                        <input name="act" id="act" type="hidden" value="{*$cf_action*}" />
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
                            <tbody>
                                <tr>
                                    <td width="15%" align="right">父栏目: </td>
                          <td width="85%" align="left"><select name="menu_parent_id" id="menu_parent_id">
                                            <option value="{*if !$row.menu_parent_id*}selected='selected'{*/if*}">顶级目录</option>
                                            {*foreach name=menu_part item=item from=$menu_array*}
                                            <option value="{*$item.menu_id*}" {*if $row.menu_parent_id==$item.menu_id*}selected="selected"{*/if*}>{*$item.menu_title*}&nbsp;[ID:{*$item.menu_id*}]</option>
                                            {*foreach name=menu_part2  item=item2 from=$item.child*}
                                            <option value="{*$item2.menu_id*}" {*if $row.menu_parent_id==$item2.menu_id*}selected="selected"{*/if*}>&nbsp;&nbsp;&nbsp;├ {*$item2.menu_title*}&nbsp;[ID:{*$item2.menu_id*}]</option>
                                            {*foreach name=menu_part3 item=item3 from=$item2.child*}
                                            <option value="{*$item3.menu_id*}" {*if $row.menu_parent_id==$item3.menu_id*}selected="selected"{*/if*}>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├ {*$item3.menu_title*}&nbsp;[ID:{*$item3.menu_id*}]</option>
                                            {*/foreach*}
                                            {*/foreach*}
                                            {*/foreach*}
                                        </select></td>
                                </tr>
                                <tr>
                                    <td align="right">标题:</td>
                                    <td align="left"><input name="menu_title" type="text" id="menu_title" value="{*$row.menu_title*}" size="25" maxlength="20" /></td>
                                </tr>
                                
                                <tr>
                                    <td align="right">指向地址:</td>
                                    <td align="left"><input name="menu_link" type="text" id="menu_link" value="{*$row.menu_link*}" size="35" maxlength="50" /></td>
                                </tr>
<!--                                <tr>
                                    <td align="right">窗口打开方式:</td>
                                    <td align="left">{*html_radios name=menu_target options=$cf_info_var.1 checked=$row.menu_target|default:''*}</td>
                                </tr>-->
                                <tr>
                                    <td align="right">排序:</td>
                                    <td align="left"><input name="menu_order" type="text" id="menu_order" value="{*$row.menu_order|default:999*}" size="3" maxlength="3" />
                                    	&nbsp;<span class="red">0是最前</span></td>
                                </tr>
<!--                                <tr>
                                    <td align="right">是否为日常:</td>
                                    <td align="left">{*html_radios name=menu_common options=$cf_info_var.2 checked=$row.menu_common|default:'0'*}</td>
                                </tr>-->
<!--                                <tr>
                                  <td align="right">样式:</td>
                                  <td align="left"><input name="menu_class" type="text" id="menu_class" value="{*$row.menu_class*}" size="25" maxlength="20" /></td>
                                </tr>-->
                                <tr>
                                    <td colspan="2" align="center"><input type="submit" name="Submit" value="提 交" class="myinput" />
                                        &nbsp;&nbsp;
                                        <input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></td>
                                </tr>
                            </tbody>
                        </table>
                  </form>
                </div>
            	</div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>
                {*else*}
                <script type="text/javascript">
                    $(function(){
                        $(".openpart").toggle(
                        function(){$("."+this.id).hide();$("#"+this.id).attr("src","public/images/admin/close_part.gif")},
                        function(){$("."+this.id).show();$("#"+this.id).attr("src","public/images/admin/open_part.gif")}
                        )
                    })
                </script>
                <div class="content_panel_title">
                <div class="contentpanelleft"></div>
                <div class="contentpanelcenter">
                    <span class="contentpanelcenter_font">菜单管理</span><span><a class="edit at" href="{*$cf_self_path*}-act_add.htm?dpt={*$cf_dpt*}">新增菜单</a></span>                </div>
                <div class="contentpanelrihgt"></div>
            </div>
                <div class="content_table_center_style">
                	<div class="p8">
                    <table width="100%" class="tbl tbl_nbr">
                        <thead>
                            <tr class="thd">
                                <td align="center">ID</td>
                                <td align="center" class="thr">栏目标题</td>
                                <td align="center" class="thr">指向地址</td>
                                <td align="center" class="thr">样式</td>
                                <td align="center" class="thr">排序</td>
                                <td align="center" class="thr">常用菜單</td>
                                <td colspan="3" align="center" class="thr">操作</td>
                            </tr>
                        </thead>
                        <tbody>
                            {*foreach name=menu_part item=item from=$menu_array*}
                            {*assign var=target value=$item.menu_target*}
                            {*assign var=common value=$item.menu_common*}
                            {*assign var=part value='part-'|cat:$item.menu_id*}
                            <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'" style=" background-color:#FFFFFF">
                                <td align="center">{*$item.menu_id*}</td>
                                <td><img src="public/images/admin/open_part.gif" class="openpart" id="{*$part*}" align="absmiddle" alt="" />{*$item.menu_title*}</td>
                                <td>{*$item.menu_link*}</td>
                                <td align="center">{*$item.menu_class*}<!--{*$cf_info_var.1.$target*}--></td>
                                <td align="center">{*$item.menu_order*}</td>
                                <td align="center">{*$cf_info_var.2.$common*}</td>
                                <td align="center"><a href="{*$cf_self_path*}-act_add_pid_{*$item.menu_id*}.htm?dpt={*$cf_dpt*}">新增子项</a></td>
                                <td align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item.menu_id*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
                                <td align="center">{*if $item.menu_id>1*}<a href="{*$cf_self_path*}-act_del_id_{*$item.menu_id*}.htm?dpt={*$cf_dpt*}" class="del" onclick="return confirm('你确定要删除吗?')">删除</a>{*/if*}</td>
                            </tr>
                            {*foreach name=menu_part2  item=item2 from=$item.child*}
                  	{*assign var=target value=$item2.menu_target*}
               	 	{*assign var=common value=$item2.menu_common*}
                            <tr class="{*$part*}"  onmouseout="this.style.backgroundColor='#fff'" onmouseover="this.style.backgroundColor='#ffc'" style=" background-color:#ffffff">
                                <td align="center">{*$item2.menu_id*}</td>
                                <td>&nbsp;&nbsp;&nbsp;├ {*$item2.menu_title*}</td>
                                <td>{*$item2.menu_link*}</td>
                                <td align="center">{*$item2.menu_class*}<!--{*$cf_info_var.1.$target*}--></td>
                                <td align="center">{*$item2.menu_order*}</td>
                                <td align="center"><a href="{*$cf_self_path*}-act_set_id_{*$item2.menu_id*}_type_common_value_{*$common*}.htm?dpt={*$cf_dpt*}">{*$cf_info_var.2.$common*}</a></td>
                                <td align="center"><a href="{*$cf_self_path*}-act_add_pid_{*$item2.menu_id*}.htm?dpt={*$cf_dpt*}">新增子项</a></td>
                                <td align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item2.menu_id*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
                                <td align="center"><a href="{*$cf_self_path*}-act_del_id_{*$item2.menu_id*}.htm?dpt={*$cf_dpt*}" class="del" onclick="return confirm('你确定要删除吗?')">删除</a></td>
                            </tr>
                            {*foreach name=menu_part3  item=item3 from=$item2.child*}
                     	{*assign var=target value=$item3.menu_target*}
               	 		{*assign var=common value=$item3.menu_common*}
                            <tr class="{*$part*}"  onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'" style=" background-color:#FFFFFF">
                                <td align="center">{*$item3.menu_id*}</td>
                                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├ {*$item3.menu_title*}</td>
                                <td>{*$item3.menu_link*}</td>
                                <td align="center">{*$item3.menu_class*}<!--{*$cf_info_var.1.$target*}--></td>
                                <td align="center">{*$item3.menu_order*}</td>
                                <td align="center"><a href="{*$cf_self_path*}-act_set_id_{*$item3.menu_id*}_type_common_value_{*$common*}.htm?dpt={*$cf_dpt*}">{*$cf_info_var.2.$common*}</a></td>
                                <td align="center">&nbsp;</td>
                                <td align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item3.menu_id*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
                                <td align="center"><a href="{*$cf_self_path*}-act_del_id_{*$item3.menu_id*}.htm?dpt={*$cf_dpt*}" class="del" onclick="return confirm('你确定要删除吗?')">删除</a></td>
                            </tr>
                            {*/foreach*}
                            {*/foreach*}
                            {*/foreach*}

                            <tr class="tft">
                                <td colspan="9"><div class="turnPage"><p><!--{*$mypage*}--></p></div></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            	</div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>

                {*/if*}
            </div>


           
            
                      </td>
    </tr>
</table>
{*include file="template/admin_foot.htm"*}


